
package com.jf.cloud.supplier.feign;

import com.jf.cloud.api.supplier.feign.SupplierRefundAddrFeignClient;
import com.jf.cloud.api.supplier.vo.SupplierApiRefundAddrVO;
import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.common.security.AuthUserContext;
import com.jf.cloud.supplier.service.SupplierRefundAddrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.v3.oas.annotations.Hidden;

/**
 * @author zz
 * @date 2020/11/23
 */
@RestController
@Hidden
public class SupplierRefundAddrFeignController implements SupplierRefundAddrFeignClient {

    @Autowired
    private SupplierRefundAddrService supplierRefundAddrService;

    @Override
    public ServerResponseEntity<SupplierApiRefundAddrVO> getSupplierRefundAddrByRefundAddrId(Long refundAddrId) {
        Long supplierId = AuthUserContext.get().getTenantId();
        SupplierApiRefundAddrVO supplierRefundAddr = supplierRefundAddrService.getBySupplierRefundAddrId(refundAddrId,supplierId);
        return ServerResponseEntity.success(supplierRefundAddr);
    }
}
